#ifndef __TANK_H__
#define __TANK_H__

#include <boost/shared_ptr.hpp>
#include <string>
#include <SFML/Graphics.hpp>
#include <Box2D/Box2D.h>
#include "Utils.hpp"


class Tank
{
	public :
		Tank();
		Tank(const Tank& t);
		Tank& operator=(const Tank& t);
		virtual ~Tank();
		
		virtual void update() = 0;
		
		void setColor(const std::string& color);
		ImagePtr cannonImage();
		ImagePtr groundImage();
		
		sf::Vector2f position() const;
		bool isAlive() const;
	protected :
	
		// graphics
		unsigned int m_indexCannon;
		unsigned int m_indexGround;
		std::string m_color; // "green", "blue"
		sf::Vector2f m_position;
	
		// miscellanous
		unsigned int m_life;
		 	
		// physics
		b2Body* m_body;
};

typedef boost::shared_ptr<Tank> TankPtr;

#endif /* __TANK_H__ */

